package com.fjnu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.fjnu.dao.IPermissionDao;
import com.fjnu.entities.Permission;
import com.fjnu.service.IPermissionService;
@Service
@Transactional(propagation=Propagation.REQUIRED)
public class PermissionService implements IPermissionService {
	@Autowired
	private IPermissionDao permissionDao;
	public void addPermission(Permission p) {
		permissionDao.addPermission(p);
	}

	
	public void delPermission(int id) {
		permissionDao.delPermission(id);

	}



	public List<Permission> findAllPermission() {
		return permissionDao.findAllPermission();
	}



	public Permission findPermissionUnique(int id) {
		
		return permissionDao.findPermissionUnique(id);
	}

}
